#ifndef QBACKGROUNDEDITOR_H
#define QBACKGROUNDEDITOR_H

#include <QDialog>
#include <QStackedWidget>
#include <QMap>

namespace SHAREDLIB
{
    class QAbstractProperty;
}

namespace Ui {
class QStylesheetEditor;
}

class tagStyleItem;

namespace CORELIB
{
    class QStylesheetTableBar;
    class QAbstractStylesheetWidget;
    class QStylesheetList;
    class QStylesheetEditor : public QDialog
    {
        Q_OBJECT

    public:
        explicit QStylesheetEditor(SHAREDLIB::QAbstractProperty *property,QWidget *parent = 0);
        ~QStylesheetEditor();

        void    addItem(tagStyleItem* item);
    protected slots:
        void    makeStylesheet();
        void    showSelect(int index);
    private:
        Ui::QStylesheetEditor *ui;
    protected:
        SHAREDLIB::QAbstractProperty    *m_property;
        QStackedWidget                  *m_stackedWidget;
        QMap<QString,QAbstractStylesheetWidget*>          m_widgets;

        QWidget                          *m_widget;
        QStylesheetList                  *m_stylesheetList;
    private slots:
        void on_okBtn_clicked();
        void on_cancelBtn_clicked();
        void on_resetBtn_clicked();
        void on_clearBtn_clicked();
    };

}

#endif // QBACKGROUNDEDITOR_H
